﻿<%@ Page Title="" Language="C#" Theme="Default_Themes" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="DSDoanVienGioiThieuDang.aspx.cs" Inherits="DanhMuc_DSDoanVienGioiThieuDang" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="udt" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pntcontent" runat="server">
            <div class="row-fluid">
                <div class="span12">
                    <div class="box">
                        <div class="box-title">
                            <h3><i class="icon-table"></i>Danh sách đoàn viên ưu tú giới thiệu cho đảng: <%=st %></h3>
                            <div class="box-tool">
                                <div class="box-tool">
                                    <a data-action="collapse" href="#"><i class="icon-chevron-up"></i></a>
                                    <a data-action="close" href="#"><i class="icon-remove"></i></a>

                                </div>
                            </div>
                        </div>
                        <div class="box-content" style="border: 1px solid #B6D1F2;">
                            <div class="btn-toolbar pull-left clearfix" style="display: inline-block; float: left; min-width: 200px; width: 253px;">
                                <div class="btn-group">
                                    <asp:TextBox placeholder="Tìm kiếm theo tên" ID="txtHoten" runat="server" Height="14px" Style="margin-bottom: 0px" Width="189px"></asp:TextBox>
                                      <asp:AutoCompleteExtender runat="server"
                                          ID="txtHoten_AutoCompleteExtender" 
                                           UseContextKey="True"
                                        ServiceMethod="GetCompletionList_byname"
                                        TargetControlID="txtHoten"
                                        MinimumPrefixLength="2"
                                        CompletionInterval="100"
                                        EnableCaching="true"
                                        CompletionSetCount="20"
                                        CompletionListCssClass="autocomplete_completionListElement"
                                        CompletionListItemCssClass="autocomplete_listItem"
                                        CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem">
                                    </asp:AutoCompleteExtender>
                                      &nbsp;<asp:LinkButton ID="btn_timkiem" class="btn btn-primary" OnClick="btn_timkiem_Click" runat="server" Height="16px"><i class=" icon-search"></i></asp:LinkButton>
                                </div>
                            </div>
                            <div class="btn-toolbar pull-right clearfix">
                                <div class="btn-group">

                                    &nbsp;&nbsp;<asp:Button ID="Btn_xuatfile" runat="server" class="btn btn-inverse  " OnClick="Btn_xuatfile_Click" Text="Xuất file Excel" Width="112px" />&nbsp; 

                                </div>
                                <br />
                                <asp:Label ID="lblstatus" runat="server" Visible="False"></asp:Label>

                            </div>
                            <div class="row-fluid">
                                <!--Thanh cuon ngang-->
                                <asp:GridView ID="Grid_DSDVDang" runat="server" OnRowCommand="Grid_DSDVDang_RowCommand" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" Width="100%" CellPadding="5" ForeColor="#333333" GridLines="None" Style="margin-top: 0px" CellSpacing="1" DataKeyNames="MaDoanVien" BorderStyle="Solid" BorderWidth="1px">
                                    <AlternatingRowStyle BackColor="White" />
                                    <Columns>
                                        <asp:TemplateField HeaderText="Chọn ">
                                            <HeaderTemplate>
                                                <asp:CheckBox ID="chkselectAll" runat="server" OnCheckedChanged="chkInGridviewHeader_CheckedChanged" AutoPostBack="true" />
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="chkchon" Enabled="true" Checked="false" runat="server" />
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Mã Đoàn Viên">
                                            <ItemTemplate>
                                                <asp:Label runat="server" ID="lblMaDoanVien" Text='<%#Eval("MaDoanVien") %>'></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Tên đoàn viên">
                                            <ItemTemplate>
                                                <asp:Label ID="lblTenDoanVien" runat="server" Text='<%#Eval("TenDoanVien") %>'></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Phái">
                                            <ItemTemplate>
                                                <%#Eval("Phai") %>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Ngày sinh">
                                            <ItemTemplate>
                                                <%#Eval("NgaySinh") %>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="CMND">
                                            <ItemTemplate>
                                                <%#Eval("CMND") %>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Ngày giới thiệu">
                                            <ItemTemplate>
                                                <%#Eval("NgayGioiThieu") %>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Kết nạp đảng">
                                            <ItemTemplate>
                                                <asp:CheckBox ID="chk_KetNapDang" runat="server" Checked='<%#Eval("KetNapDang") %>' OnCheckedChanged="chk_KetNapDang_CheckedChanged" AutoPostBack="true" />
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Ngày kết nạp đảng">
                                            <ItemTemplate>
                                                <%#Eval("NgayKetNapDang") %>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Hủy giới thiệu đảng">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="LinkButtonHuy" runat="server" CausesValidation="false" CommandName="HuyGioiThieu" CommandArgument='<%#Eval("MaDoanVien") %>'
                                                            Text="<i class=icon-file-text-alt></i> Hủy giới thiệu" Visible='<%#Eval("HuyKetNap") %>'></asp:LinkButton>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <EditRowStyle BackColor="#2461BF" />
                                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                    <RowStyle BackColor="#EFF3FB" />
                                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                                </asp:GridView>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </asp:Panel>
        <asp:Panel ID="pnketnapdang" runat="server" Visible="false">
            <div class="row-fluid">
                <div class="span12">
                    <div class="box">
                        <div class="box-title">
                            <h3><i class="icon-table"></i>Thông tin kết nạp đảng của đoàn viên</h3>
                            <div style="float:right;">
                                <asp:LinkButton ID="btnclose" Visible="true" runat="server" class="btn  btn-danger" OnClick="btnclose_Click"><i class="icon-signout"></i> Đóng</asp:LinkButton>
                            </div>
                        </div>
                        <div class="box-content" style="border: 1px solid #B6D1F2;">
                            <input type="hidden" runat="server" id="txtmadoanvienvaodang" />
                            <asp:TextBox BorderStyle="Solid" placeholder="Ngày/tháng/năm" BorderColor="#3A87AD" BorderWidth="1px" ID="txtvaodang" runat="server" class="span3"></asp:TextBox>
                            <asp:ImageButton runat="Server" ID="Image1" ImageUrl="~/css/icons/lich.gif" AlternateText="Click to show calendar" />
                            <ajaxToolkit:CalendarExtender ID="calendarButtonExtender2" runat="server" TargetControlID="txtvaodang" PopupButtonID="Image1" Format="dd/MM/yyyy" />
                            <asp:LinkButton ID="btnsave" class="btn btn-primary"  runat="server" Width="60px" OnClick="btnsave_Click"><i class="icon-save"></i>&nbsp;&nbsp;Lưu</asp:LinkButton>
                            <asp:LinkButton ID="LinkButton1" Visible="true" runat="server" class="btn  btn-danger" OnClick="btnclose_Click"><i class="icon-signout"></i> Đóng</asp:LinkButton>
                            <asp:Label ID="lblthanhcong" runat="server" ForeColor="Red"></asp:Label>
                        </div>
                    </div>
                </div>
            </div>
        </asp:Panel>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="Btn_xuatfile" EventName="Click" />
             <asp:AsyncPostBackTrigger ControlID="btn_timkiem" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="udtprogress" runat="server" AssociatedUpdatePanelID="udt">
        <ProgressTemplate>
            <div class="progress">
                <img src="../img/ajax-loader.gif" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>  
     <script type="text/javascript">
         $(document).ready(function () {
             $('#dvGridWidth').width($('#dvScreenWidth').width());
         });
    </script>
     <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</asp:Content>

